# Contributor: Simon Zeni <simon@bl4ckb0ne.ca>
# Maintainer: Simon Zeni <simon@bl4ckb0ne.ca>
pkgname=waffle
pkgver=1.6.1
pkgrel=0
pkgdesc="C library for selecting an OpenGL API and window system at runtime"
url="https://gitlab.freedesktop.org/mesa/waffle"
arch="all"
license="BSD-2-Clause"
makedepends="eudev-dev mesa-dev mesa-gbm mesa-egl wayland-dev meson cmocka-dev"
source="$pkgname-$pkgver.tar.gz::https://gitlab.freedesktop.org/mesa/waffle/-/archive/v$pkgver/waffle-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"
options="!check" # tests are platform dependant (x11/wayland)
subpackages="$pkgname-doc"

prepare() {
	meson build \
		--buildtype=plain \
		--prefix=/usr \
		-Dbuild-examples=false
}

build() {
	ninja -C build
}

package() {
	DESTDIR="$pkgdir" ninja -C build install
}
sha512sums="b3ffb338e8dcd77a9f44a0ec0e65af0dbabecd16ce86f3e52c39f9fbaae2d01d2c0051d917b3b8186b7a91e323951127f72e7bd6ea5d335bd38080dc8aa799a4  waffle-1.6.1.tar.gz"
